| Conditions | 2 |
| Paths | 2 |
| Total Lines | 21 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 5 | ||
| Bugs | 0 | Features | 0 |
| 1 | class ITF14{ |
||
| 2 | constructor(string){ |
||
| 3 | this.string = string; |
||
| 4 | |||
| 5 | // Add checksum if it does not exist |
||
| 6 | if(string.search(/^[0-9]{13}$/) !== -1){ |
||
| 7 | this.string += this.checksum(string); |
||
| 8 | } |
||
| 9 | |||
| 10 | this.binaryRepresentation = { |
||
| 11 | "0":"00110", |
||
| 12 | "1":"10001", |
||
| 13 | "2":"01001", |
||
| 14 | "3":"11000", |
||
| 15 | "4":"00101", |
||
| 16 | "5":"10100", |
||
| 17 | "6":"01100", |
||
| 18 | "7":"00011", |
||
| 19 | "8":"10010", |
||
| 20 | "9":"01010" |
||
| 21 | }; |
||
| 22 | } |
||
| 23 | |||
| 75 |